package v1

import (
	"gf_blog_admin/internal/model"
	"github.com/gogf/gf/v2/frame/g"
)

type MenuListReq struct {
	g.Meta `path:"/system/menu" method:"get" tags:"system" sm:"菜单列表" can:"system.menu"`
}

type MenuListRes struct {
	Rows []*model.MenuItem `json:"rows" dc:"列表集合"`
}

type MenuTreeReq struct {
	g.Meta `path:"/system/menu/tree" method:"get" tags:"system" sm:"菜单列表" can:"system.menu.tree"`
}

type MenuTreeRes struct {
	Rows []*model.MenuTreeItem `json:"rows" dc:"树形集合"`
}

type MenuStoreReq struct {
	g.Meta `path:"/system/menu/store" method:"post" tags:"system" sm:"菜单创建" can:"system.menu.store"`
	model.MenuFormInput
}

type MenuStoreRes struct{}

type MenuUpdateReq struct {
	g.Meta `path:"/system/menu/update/{id}" method:"put" tags:"system" sm:"菜单更新" can:"system.menu.update"`
	Id     uint64 `json:"id" in:"query" v:"required|min:1" dc:"菜单id"`
	model.MenuFormInput
}

type MenuUpdateRes struct{}

type MenuDestroyReq struct {
	g.Meta `path:"/system/menu/destroy" method:"delete" tags:"system" sm:"菜单删除" can:"system.menu.destroy"`
	Ids    []uint64 `json:"ids" v:"required|array|max-length:200" dc:"菜单id集合"`
}

type MenuDestroyRes struct{}
